The operation of planning control functions of an automation system is often based on graphical function plans in which the required automation functions are placed in the form of graphical function blocks, are parameterized and are connected to one another. Such a function plan can be configured, for example, in accordance with the industry standard IEC 61131-3. The function blocks, which are also referred to as function modules or simply only as modules, generally have one or more inputs and/or outputs. The output signals from other upstream modules in the function plan are usually read in at the inputs. In addition to such “internal” inputs,. there are often also external inputs, at which signals provided by modules in another function plan are read in in a cross-plan manner, and those inputs which are intended to read in a signal (process signal) which has been directly taken or read from the process to be monitored or controlled. Finally, it is also possible to provide modules having firmly parameterized input ports which do not have an input connection. In accordance with the fundamental principle “input—processing—output”, the input signals are processed in a module and the resultant results are provided at the outputs. Since the signals which are processed in the modules normally represent logic signals and not physical variables, isolated modules or so-called end modules without outputs may also exist inside a function plan. Other outputs in turn may be external or cross-plan outputs of the function plan.
Each of the automation functions represented by a function module is usually assigned a corresponding software routine which can be stored, for example, in a program library in the form of software code, which can be executed on a target platform, or else can be dynamically generated in an interpreter or the like. The program routines corresponding to the individual modules are generally executed and processed on the target platform of the automation system in a sequential manner in a fixed time clock, in which case, once all of the modules belonging to a sequence group or to a function plan have been processed, processing begins again after a particular waiting time. In this case, it is important, particularly in the case of relatively large function plans with a large number of modules and feedback loops, to select the processing order of the modules in such a manner that cycle delays or dead times in the signal profiles are avoided or at least minimized. As a result, the quickest possible reaction of the automation system to the underlying process should be ensured. A cycle delay is used to denote the situation in which a module which is connected downstream on the signal side is executed before the signal-generating module itself is executed and the signal from the previous cycle is thus present at the module input and is used for the internal calculation. Such a cycle delay or cycle offset, which may result in particular from feedback of signals, ultimately results in a signal which is needed to process a function being available only during the execution of the cycle after next or in the module operating with a signal that is not current and originates from the previous cycle. This results in a reaction of the system which is delayed by the number of cycle delays. Although increasing the clock rate for the entire connection could, in principle, shorten the reaction time again, this usually cannot be sustained for economic reasons.
Since the entire connection of all modules in an automation unit can become very complex, the sequence order should preferably be determined automatically under the secondary condition that the number of cycle delays should be as small as possible for high efficiency of the automation system. Such a method for automatically determining the processing order of modules in a function plan for a sequentially operating automation system is disclosed, for example, in DE 42 30 178 A1. However, the method described there, in which the signal path is essentially traced back in a recursive procedure starting from a system output—that is to say from an external (cross-plan) output in the terminology selected above, the end points of the respective reverse propagation being allocated consecutive processing numbers in ascending order, cannot be used in function plans without signal output and without cross-plan output connections since, in this case, the necessary prerequisites and boundary conditions are absent.
Another disadvantage of the previous solution becomes noticeable particularly if the function plan has been segmented into a plurality of partial plans for easier comprehensibility and clarity or for other reasons. This is because the processing order of the partial plans is not taken into account when determining the respective plan-internal module order in the already known method. In addition, this method has performance problems and does not operate in a strictly deterministic manner since inputs of a module are interrogated in an arbitrary order. Repeatedly carrying out the method with function plans which are connected in an identical manner may thus lead to different results.